package cn.mst.vrs.convert;

import cn.mst.vrs.controller.admin.ordertype.vo.OrderTypeDictRespVO;
import cn.mst.vrs.dal.dataobject.ordertype.OrderTypeDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface OrderTypeConvert {
    OrderTypeConvert INSTANCE = Mappers.getMapper(OrderTypeConvert.class);

    @Mapping(target = "label", source = "code")
    @Mapping(target = "value", source = "id")
    OrderTypeDictRespVO toDictRespVO(OrderTypeDO entity);

    List<OrderTypeDictRespVO> toDictRespVOList(List<OrderTypeDO> orderTypeDOList);
}
